<template lang="html">
  <div class="message-list">
    <ul class="message-list-container">
      <li v-for='(item,index) in MessageListData' :key='index' class="clear-fix">
        <div class="message-list-pic">
          <img :src="item.img" alt="">
        </div>
        <div class="message-list-middle">
          <div class="message-list-username">
            {{ item.username }}
          </div>
          <div class="message-list-keywords">
            {{ item.keywords }}
          </div>
        </div>
        <div class="message-list-date">{{ item.date }}</div>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  name:'MessageList',
  data(){
    return{

    }
  },
  props:{
    MessageListData:{
      type:Array,
      default:function(){
        return []
      }
    }
  }
}
</script>

<style lang="less" scoped>

.message-list{
  width: 100%;
  min-height: 5rem;
  padding: 0 0.3rem;
  box-sizing: border-box;
  background-color: #fff;
  .message-list-container{
    li{
      padding: 0.1rem 0;
      border-bottom: 1px solid #f1f1f1;
      .message-list-pic,.message-list-middle{
        float: left;
      }
      .message-list-date{
        float: right;
      }
      .message-list-pic{
        margin-right: 0.14rem;
        img{
          width: 0.8rem;
          height: 0.8rem;
        }
      }
      .message-list-middle{
        .message-list-keywords{
          font-size: 0.24rem;
          color: #757575;
        }
      }
      .message-list-date{
        font-size: 0.24rem;
        color: #757575;
      }
    }
  }
}


</style>
